﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Collections;
using SCSService;

namespace SCS.Core.Models
{
    public class PostArticleModel
    {
        public static int iCreatePost_In_Category(Post_In_Category PostInCategory)
        {
            PostArticleService PostArticleSvc = new PostArticleService();
            return PostArticleSvc.CreatePost_In_Category(PostInCategory);
        }
        public static void DeletePost_In_CategoryByPostID(int? iPostId)
        {
            PostArticleService PostArticleSvc = new PostArticleService();
            PostArticleSvc.DeletePost_In_CategoryByPostID(iPostId);
        }
        public static int UpdatePostArticle(Post PostArticle)
        {
            PostArticleService PostArticleSvc = new PostArticleService();
            return PostArticleSvc.UpdatePostArticle(PostArticle);
        }
        public static List<int> lGetCategoryIDByPostID(int? iPostId)
        {
            PostArticleService PostArticleSvc = new PostArticleService();
            return PostArticleSvc.GetCategoryIDByPostID(iPostId);
        }
        public static List<Post_Category> lGetAllCatePostArticle(int iLanguage, int iSiteGuid)
        {
            PostArticleService PostArticleSvc = new PostArticleService();
            return PostArticleSvc.GetAllCatePostArticle(iLanguage, iSiteGuid);
        }
        public static List<Post> IGetListPostByIdCate(int? iCategoryId, int? iPostUser, int iSiteGuid, int iLanguageId)
        {
            PostArticleService PostArticleSvc = new PostArticleService();
            return PostArticleSvc.GetListPostByIdCate(iCategoryId,iPostUser,iSiteGuid,iLanguageId);
        }
        public static void UpdateStatus(int? iId, int? iPostStatus)
        {
            PostArticleService PostArticleSvc = new PostArticleService();
            PostArticleSvc.UpdateStatus(iId, iPostStatus);
        }

        public static void DeletePost(int? iPostId)
        {
            PostArticleService PostArticleSvc = new PostArticleService();
            PostArticleSvc.DeletePost(iPostId);
        }
        public static Post GetPostByPostId(int? iPostId)
        {
            PostArticleService PostArticleSvc = new PostArticleService();
            return PostArticleSvc.GetPostByPostId(iPostId);
        }

    }
}
